package service;



import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.SqlSession;
import org.springframework.web.bind.annotation.RequestParam;

import pojo.Users;
import util.MybatisSessionFactory;
import dao.UsersDao;

public class UsersService {
	SqlSession sql=MybatisSessionFactory.getSqlSession();
	UsersDao dao=sql.getMapper(UsersDao.class);
    public Users query(
    		@RequestParam(value="account",defaultValue="")String account,
  	        @RequestParam(value="password",defaultValue="")String password){
    	return dao.query(account, password);
    }
    public Map<String,Object> querynickname(@Param("id") String id){
    	    Map<String,Object> map=dao.querynickname(id);
    	    return map;
    }
}
